
#ifndef _DYNAMIC_PTR_ARR_
#define _DYNAMIC_PTR_ARR_

#ifndef dynamic_ptr_arr_type
	#define dynamic_ptr_arr_type void*
	#define dynamic_ptr_arr_type_scan_format "%i"
#endif

#include "../common/error.h"
#include <memory.h>

typedef struct dynamic_ptr_arr
{
	int capacity;
	int count;
	dynamic_ptr_arr_type* values;
} dynamic_ptr_arr;

dynamic_ptr_arr* dynamic_ptr_arr__allocate();
dynamic_ptr_arr* dynamic_ptr_arr__allocate_capacity(int initial_capacity);
void dynamic_ptr_arr__grow(dynamic_ptr_arr* arr);
void dynamic_ptr_arr__add(dynamic_ptr_arr* arr, dynamic_ptr_arr_type value);
void dynamic_ptr_arr__free(dynamic_ptr_arr* arr);

#endif /*  _DYNAMIC_PTR_ARR_ */

